Skip to content

Add support for pull_request_review trigger event#96

Merged
wechuli merged 1 commit intowechuli:mainfrom
michal-redstone:michal/support-pr-review-trigger
Dec 31, 2025
Merged

Add support for pull_request_review trigger event#96
wechuli merged 1 commit intowechuli:mainfrom
michal-redstone:michal/support-pr-review-trigger

Conversation

@michal-redstone
Copy link
Copy Markdown
Contributor

Motivation

I noticed that this GH Action, when triggered via pull_request_review event:

  • fails to produce summary
  • emits this warning:
    if (!this.ownCheck) {
    core.warning(
    `Could not determine own allcheckspassed check (expected name: ${JSON.stringify(
    ownCheckName
    )}, this may cause an indefinite loop)`
    );
    }
  • reports a false-positive result

This is caused by invalid resolution of the PR's HEAD commit SHA, which in turn is needed to fetch check statuses from GitHub API.

Changes

Add pull_request_review to validPullRequestEvents so that the GH Action can resolve the commitSHA properly.

Note that pull_request?.head.sha is defined for pull_request_review event the same as it is for pull_request and pull_request_target events: https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=submitted#pull_request_review

@wechuli wechuli requested a review from Copilot December 31, 2025 18:41
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the pull_request_review trigger event to enable proper commit SHA resolution and check status fetching when the GitHub Action is triggered by pull request reviews.

  • Added pull_request_review to the list of valid pull request events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@wechuli wechuli merged commit 94f72d1 into wechuli:main Dec 31, 2025
4 checks passed
@michal-redstone michal-redstone deleted the michal/support-pr-review-trigger branch January 2, 2026 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants